<template>
  <div style="background-color: #fff; height: 60px;">
    <el-row>
      <el-col :span="18" :offset="3">
        <el-row>
          <el-col :span="4">
            <div style="display: flex; align-items: center; height: 60px">
              <img src="../assets/logo3.png" alt="logo" style="width: 150px">
            </div>

          </el-col>
          <el-col :span="16">
            <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
              <el-menu-item index="1">首页</el-menu-item>
              <el-submenu index="2">
                <template #title>菜谱</template>
                <el-menu-item index="2-1">选项1</el-menu-item>
                <el-menu-item index="2-2">选项2</el-menu-item>
                <el-menu-item index="2-3">选项3</el-menu-item>
              </el-submenu>
              <el-menu-item index="3">饮食健康</el-menu-item>
              <el-menu-item index="4">笔记</el-menu-item>
              <el-menu-item index="5">商城</el-menu-item>
              <el-menu-item index="6">动漫</el-menu-item>
            </el-menu>
          </el-col>

          <el-col :span="4">
            <div style="height: 60px; line-height: 60px">
              <span>登录</span> | <span>注册</span>
            </div>
          </el-col>
        </el-row>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'Header',
  data() {
    return {
      activeIndex: null
    }
  },
  methods: {
    handleSelect() {

    }
  }
}
</script>

<style scoped>
.el-menu-item, .el-submenu__title {
  font-weight: bold !important;
  padding: 0 10px !important;
  height: 50px !important;
}
#caipu{
  font-weight: bold !important;
  padding: 0 10px !important;
}
.el-menu-item:hover, .el-submenu__title:hover {
  color: orange !important;
}
.el-menu--horizontal>.el-menu-item.is-active {
  border-bottom: 2px solid orange !important;
  color: orange !important;
}
</style>
